package com.wanxi.generictype;

import java.util.ArrayList;
import java.util.List;

public class TestAll {

    public static void main(String[] args) {
        ArrayList <Character> arrayList = new ArrayList<>();
        TestAll.addElementsToList(arrayList,'1','2','3','4');
    }

    public static <T> List<T> addElementsToList(List<T> list, T element1, T element2, T element3, T element4) {
        list.add(element1);
        list.add(element2);
        list.add(element3);
        list.add(element4);
        return list;
    }
}
